#include <iostream>
#include <algorithm>
#include <string>
#include <cstdio>
#include <vector>
#include <stack>
#include <queue>
#include <set>
using namespace std;
struct TreeNode
{
    int val;
    TreeNode *left;
    TreeNode *right;
    TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Codec
{
public:
    // Encodes a tree to a single string.
    string serialize(TreeNode *root)
    {
        queue<TreeNode *> que;
        que.emplace(root);
        string str = "[";
        while (que.empty() == false)
        {
            TreeNode *ptr = que.front();
            que.pop();
            if (ptr == nullptr)
                str += ",null";
            else
            {
                if (str.size() >= 1)
                    str += ",";
                str += to_string(ptr->val);
                que.push(ptr->left);
                que.push(ptr->right);
            }
        }
        str += "]";
        return str;
    }

    // Decodes your encoded data to tree.
    TreeNode *deserialize(string data)
    {
        return nullptr;
    }
};